home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
newsgroups
/
misc.20020314-20021006
/
000085_sonicechoesWit…pam@hotmail.com_Tue May 21 08:58:22 EDT 2002.msg
< prev
next >
Wrap
Text File
|
2020-01-01
|
3KB
|
108 lines
Article: 13379 of comp.protocols.kermit.misc
Path: newsmaster.cc.columbia.edu!news.cs.columbia.edu!peerfeed.news.psi.net!unlisys!news.snafu.de!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-out.nuthinbutnews.com!propagator-sterling!news-in.nuthinbutnews.com!feed.cgocable.net!news.sprintnetops.net!sjc-peer.news.verio.net!news.verio.net!sn-xit-01!sn-post-01!supernews.com!corp.supernews.com!not-for-mail
From: dgk <sonicechoes@hot-nospamp-mail.com>
Newsgroups: comp.protocols.kermit.misc
Subject: Why does my script exit?
Date: Tue, 21 May 2002 08:32:06 -0400
Organization: Posted via Supernews, http://www.supernews.com
Message-ID: <b3fkeukbsnm79kdi3f4crjs4ka9vinc6f2@4ax.com>
Reply-To: sonicechoesWithNoSpam@hotmail.com
X-Newsreader: Forte Agent 1.91/32.564
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Complaints-To: newsabuse@supernews.com
Lines: 90
Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:13379
This loop, from hostmdm.ksc, exits and returns to the command prompt
after running my MM1 script:
while 1 {
answer
if > \v(dialstatus) 0 if < \v(dialstatus) 22 stop 1 Fatal modem
error
if = \v(dialstatus) 0 take MM1.ksc
echo Type Ctrl-C to exit... ; Give user a chance to
cancel
sleep 2
}
This is the MM1 script. It isn't complete, but after executing the
IFAIL code (hangup, exit), the above loop just exits and doesn't stick
around for another call. Any help appreciated.
Just as an aside, I was going to use the INTEXT macro to read a line
but that seems designed for terminal emulation and this is just being
used by another computer with its script so I don't think that I need
to worry about backspaces and cursor positions.
OUTPUT WELCOME TO THE MM1 SCRIPT\13\10\10
DEF \%C 0
:GETUSER
CLEAR INPUT
INC \%C 1
IF = \%C 6 GOTO IFAIL
OUTPUT \13\10Username:
INPUT 10 \13
DEF \%U
DEF \%Z \V(INPUT)
DEF \%I \v(incount)
DECREMENT \%I 1
;IF > \%I 1 DEF \%U \fsub(\%Z,1,\%I)
IF > \%I 1 ASG %U \fsubSTR(\%Z,1,\%I)
ASG \%B \%U
IF EQUAL {\%U} MMUSER FORWARD INITPW
IF EQUAL {\%U} JOHN FORWARD INITPW
GOTO GETUSER
:INITPW
DEF \%C 0
:GETPW
CLEAR INPUT
INC \%C 1
IF = \%C 5 GOTO IFAIL
OUTPUT \13\10Password:
INPUT 10 \13
DEF \%p
DEF \%Z \V(INPUT)
DEF \%I \v(incount)
DECREMENT \%I 1
IF > \%I 1 DEF \%p \fsubSTR(\%Z,1,\%I)
IF EQUAL {\%p} PAUL FORWARD CHECK
IF EQUAL {\%p} MMPW FORWARD CHECK
GOTO GETUSER
:IFAIL
HANGUP
EXIT
:CHECK
IF EQUAL \%B JOHN IF EQUAL \%P PAUL FORWARD CHGDIR
IF EQUAL \%B MMUSER IF EQUAL \%P MMPW FORWARD CHGDIR
GOTO GETPW
:CHGDIR ; Change directory here
:GETCMDP ;
ASG \%T 0
:GETCMD ; What does the user want to do anyway?
OUTPUT \13\10Command:\13\10
CLEAR INPUT
INPUT 10 \13
DEF \%C
DEF \%Z \V(INPUT)
DEF \%I \v(incount)
DECREMENT \%I 1
IF > \%I 1 ASG %C \fsubSTR(\%Z,1,\%I)
IF EQUAL {\%C} SND OUTPUT \13\10OK, GOTO RECEIVE
IF EQUAL {\%C} {RCV R} OUTPUT \13\10OK, GOTO SEND
IF EQUAL {\%C} BYE HANGUP,QUIT
INC \%T 1
IF = \%T 4 GOTO IFAIL
GOTO GETCMD
:RECEIVE
RECEIVE
GOTO GETCMDP
:SEND
OUTPUT WE ARE SENDING A FILE
OUTPUT RTS ; IF THERE IS ANYTHING TO SEND
OUTPUT NTS ; IF THERE IS NOTHING TO SEND
; After send we need to wait for another {RCV R} ?
GOTO GETCMDP